<template>
	<view class="repair-wrap">
		<view class="bg-white position-fixed" style="z-index: 20;width:100%">
			<view class="tab_nav" style="background-color: #FFFFFF;">
				<view class="navTitle" v-for="(item,index) in navList" :key="index">
					<view :class="{'active':isActive === index}" @click="checked(index)">
						{{item.title}}
					</view>
				</view>
			</view>
			<view v-if="isActive==0" style="width: 100%;background: #FFFFFF;">
				<view class="search">
					<image @click="changeuserType"
						:src="userType==2?'https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/yezhu.pic.jpg':'https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/yuangong.pic.jpg'"
						style="width: 70rpx;height: 70rpx;">

						<input class="search-input" v-model="input2"
							:placeholder="userType==2?'请输入房间号(一期-1-1-101)':'请输入物业员工姓名'" />
						<view class="btn" @click="selectUserList">
							<text style="color: #FFFFFF;">搜索</text>
						</view>
				</view>
			</view>
			<view v-else class="border-bottom">
				<view style="width: 100%;background: #FFFFFF;">
					<view class="search">
						<input class="search-input" v-model="name" placeholder='请输入您要查询的联系人名称' />
						<view class="btn" @click="getnewList()">
							<text style="color: #FFFFFF;">搜索</text>
						</view>
					</view>
				</view>
				<view class="u-m-t-30" style="width: 89%;margin: 0 auto;">
					<view style="margin-top: -12px;" @click="natov('/pages/news/newsDetail')">
						<view class="content-phone">
							<view style="display:flex;align-items: center;">
								<view class="ml-2">
									<image
										style="width: 60rpx;height: 60rpx;border-radius: 50%; vertical-align: middle;"
										src="https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/zz.png"></image>
								</view>
								<view style="margin-left: 20rpx;">
									<view>
										<text style="font-size: 18px;color: blue;">物业管理中心各部门电话</text>
									</view>
								</view>
							</view>
							<view class="ml-6">
								<u-icon name="arrow-right" color="#999" size="28"></u-icon>
							</view>

						</view>
					</view>
				</view>
			</view>
		</view>
			<viewData :type="'noData'" :scrolltop="scrolltop" :nextPage="!nextPage" :isTab="false"
			:isData="userList.length==0?true:false" :noDatatext=" '' " :loading="loading"
			@onRefresh="onRefresh" v-if="isActive==0">
			
			<view class="nav_item" v-if="isActive==0">
				<view style="width: 50%;margin: 50% auto;text-align: center;" v-if="!this.userList">
					<image style="width: 75px;height: 96px;" src="https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/chat.png" mode=""></image>
					<view><text style="color: #999999">没有会话信息
						</text></view>
				</view>
				<view style="margin-top: 200rpx;">
					<view v-for="(item,index) in userList" :key='index' v-show="view==1">
						<view @click="ckickUserInfo(item)">
							<view
								style="display: flex;width: 100%;margin: 15px 0;border-bottom: 1px solid #f4f4f4;padding: 10px 50rpx; box-sizing: border-box;">
								<view>
									<!-- border-radius: 8px; -->
									<view class="" style="position: relative;">
										<image style="width: 43px; height: 43px;border-radius: 50%;margin-top: -9px;"
											v-if="item.userFrontHeadPortrait" :src="item.userFrontHeadPortrait"
											mode="aspectFill">
										</image>
										<image style="width: 43px; height: 43px;border-radius: 50%;margin-top: -9px;"
											v-else src="https://clhy-img.oss-cn-beijing.aliyuncs.com/logo/avatar.jpg"
											mode="aspectFill">
										</image>
										<view class="" v-if="item.userSex">
											<image class="img_sex" :src="
												  	    item.userSex == 1 ? 'https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/male.png':'https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/female.png' "></image>
										</view>
										<image style="position: absolute;bottom: 0;right: 0; width:18px;height:18px;"
											:src="item.userType==2?ownerImg:tenantImg" mode=""></image>
									</view>
								</view>
								<view style="width: 100%;margin-top: -18rpx;">
									<view>
										<view v-if="item.userType==2">
											<view
												style="font-size: 34rpx;margin-left: 10px;position: relative;line-height: 1;">
												{{item.userNickname&&item.userNickname.length>5?item.userNickname.substring(0,5)+'...':item.userNickname}}
												<text class="red" v-if="item.dot!=0">
													{{item.dot<99?item.dot:"99+"}}
												</text>
												<text style="font-size: 24rpx;"
													v-if="reqSource=='search'">({{item.position}})</text>

												<text v-else style="float: right;">
													<text style="font-size: 24rpx;"
														v-if="item.fromPosition!=myPosition">({{item.fromPosition}})</text>
													<text style="font-size: 24rpx;"
														v-if="item.toPosition!=myPosition">({{item.toPosition}})</text>
													<text style="font-size: 24rpx;"
														v-if="item.toPosition==item.fromPosition">({{item.fromPosition}})</text>
												</text>
											</view>
										</view>
										<view class=""
											style="font-size: 38rpx;margin-left: 10px;position: relative;line-height: 1;"
											v-if="item.userType==1">
											{{item.userName}}
											<text class="red" v-if="item.dot!=0">
												{{item.dot<99?item.dot:"99+"}}
											</text>
										</view>
										<view style="margin-top: 2px;display: flex;justify-content: space-between;">
											<view style="margin-left: 10px;color: #999999; "
												v-if="item.lastMessage!=null">
												{{item.lastMessage.length>10?(item.lastMessage.substring(0,10)+'.....'):item.lastMessage}}
											</view>

											<view class="" v-if="item.lastUpdateTime">
												<view class="box_time"
													v-if="item.lastUpdateTime.substring(0,10)==currentTime">
													{{item.lastUpdateTime.substring(item.lastUpdateTime.length-8)}}
												</view>
												<view class="box_time"
													v-else-if="item.lastUpdateTime.substring(0,4)==currentYear">
													{{item.lastUpdateTime.substring(5,10)}}
												</view>
												<view class="box_time" v-else>
													{{item.lastUpdateTime.substring(0,10)}}
												</view>
											</view>
											<view style="margin-left: 10px;color: #999999;margin-top: 10px; " v-else>
												暂无聊天记录</view>
										</view>
										<!-- 展示信息 -->
										<view class="" style="margin-left: 10px;font-size: 26rpx;color: blue;">
											{{item.userType==2?item.projectName:item.orgName+'-'+item.postName}}
										</view>
									</view>

								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</viewData>
	
	
		<viewData :type="'noData'" :nextPage="!nextPage" :isTab="false"
			:isData="newsData.length == 0 ? true:false" :noDatatext=" '' " :loading="loading"
			@onRefresh="onRefresh" v-if="isActive==1">
			<view class="nav_item" style="margin-top: 260rpx;" v-if="isActive==1">
				<view class="repair-box u-p-r-30" style="display: flex;">
					<view class="u-m-t-20" style="width: 89%;margin: 0 auto;">
						<view v-for="(item,index) in newsData">
							<view style="display: flex;border-bottom: 1px solid #e5e5e5;padding-bottom: 11px;">
								<view style="margin-top: 8px;margin-left: 12px;display:flex;">
									<view>
										<view style="display: flex;">
											<view style="margin-top: 5px;color: #000000;">
												{{item.mail_company}}
											</view>
											<view style="margin-left: 20px;margin-top: 5px;color:#999">
												{{item.mail_name}}
											</view>
										</view>
										<view style="display: flex;align-items: center;margin-top: 10rpx;">
											<image style="width:30rpx;height:30rpx"
												src="https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/dianhuaben.png"></image>
											<view style="color: #999999;margin-left: 6rpx;">
												<text>电话：{{item.mail_phone}}</text>
											</view>
										</view>
									</view>
								</view>
							</view>
							<view style="float: right;margin-top: -46px;">
								<image style="width: 28px;height: 28px;margin-top: 3px;"
									@click="onCall(item.mail_phone)"
									src="https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/phone2.png" mode=""></image>
							</view>
						</view>

					</view>

				</view>

			</view>
		</viewData>
	</view>
</template>

<script>
	import url_config from '@/common/config.js'
	export default {
		data() {
			return {
				ownerImg: 'https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/owner2.png',
				tenantImg: 'https://clhy-img.oss-cn-beijing.aliyuncs.com/ownerImage/tenant.png',
				isActive: 0,
				inday: 0,
				navList: [{
					index: 0,
					title: '站内消息'
				}, {
					index: 1,
					title: "便民电话"
				}],
				message: null,
				view: 1, //1.展示人，2.展示聊天框
				input2: null, //搜索内容
				userLoggerInfo: {}, //登录人信息
				userInfo: {},
				userInfo2: {},
				headName: '私信',
				userList: [], //通知人
				information: null,
				newsData: [],
				type: '便民通讯录',
				current: 0,
				status: 'loadmore',
				loadText: {
					loadmore: '轻轻上拉加载更多',
					loading: '努力加载中',
					nomore: '实在没有了'
				},
				// listData:[],
				searchData: {},
				pageInfo: {
					page: 1
				},
				pageIndex: 1,
				loading: false,
				name: null,
				nextPage: null,
				currentTime: null,
				currentYear: null,
				userType: 2,
				myPosition: null,
				reqSource: null,
				scrolltop: 0,

			}
		},
		onPullDownRefresh() {
			this.checkLogin();
		},
		onLoad(option) {
			uni.$on("getUserList", () => {
				console.log("我收到消息啦getUserList");
				this.getUserList()
			})
			uni.$on("getOwnerAppRedDotsInfo", () => {
				console.log("我收到消息啦getOwnerAppRedDotsInfo");
				this.getUserList()
			})
		},
		onShow() {
			let hourseStr = uni.getStorageSync('projectItem')
			this.myPosition = hourseStr.buildDistrictCode + '-' + hourseStr.buildTowerCode + '-' +
				hourseStr.roomUnitNumber + '-' + hourseStr.roomCode
			uni.setStorageSync('myPosition', this.myPosition)
			this.checkLogin();
			this.getCurrentTiem()
		},
		methods: {
			changeuserType() {
				this.input2 = null
				if (this.userType == 2) {
					this.userType = 1
				} else {
					this.userType = 2
				}
				console.log('userType', this.userType)
			},
			// 获取当前时间
			getCurrentTiem() {
				let time = new Date()
				let year = time.getFullYear()
				let month = time.getMonth() + 1
				let day = time.getDate()
				this.currentTime = year + '-' + month + '-' + day
				this.currentYear = year
			},
			// 验证是否登录或实名认证
			checkLogin() {

				let _this = this
				if (uni.getStorageSync('phone')) {
					if (uni.getStorageSync('loginFlag')) {
						if (!uni.getStorageSync('hourseList')) {
							uni.showModal({
								title: '请先进行业主认证',
								showCancel: false,
								confirmText: '确认',
								confirmColor: '#F9A832',
								success: function(res) {
									if (res.confirm) {
										_this.$Router.push({
											path: '/pages/address/address'
										})
									}
								}
							});
							this.$openInvite()
						} else {
							_this.homelist = uni.getStorageSync('hourseList')[uni.getStorageSync('hourseNum') || 0]
							this.getuserInfoByLogger();
							this.selectUserList();
							this.creatSocket();
						}
					} else {
						uni.showModal({
							title: '请先实名认证',
							showCancel: false,
							confirmText: '确认',
							confirmColor: '#F9A832',
							success: function(res) {
								if (res.confirm) {
									_this.$Router.push({
										path: '/pages/realName/realName'
									})
								}
							}
						});
					}
				} else {
					uni.showModal({
						title: '请先登录',
						showCancel: false,
						confirmText: '确认',
						confirmColor: '#F9A832',
						success: function(res) {
							if (res.confirm) {
								console.log('a')
								_this.$Router.pushTab({
									path: '/pages/user/user'
								})
							}
						}
					});
				}
				uni.stopPullDownRefresh()

			},
			onCall(tel) {
				console.log(tel, "+++++++++++++++++")
				uni.makePhoneCall({
					phoneNumber: tel //仅为示例
				});
			},
			//刷新下拉
			onRefresh() {
				if (!this.nextPage) {
					this.pageIndex = this.pageIndex + 1;
					this.getnewList();
				}
			},
			//获取通讯录列表
			getnewList() {
				if (this.pageIndex < 2) {
					uni.showLoading({
						title: '加载中'
					});
				}
				this.loading = false;
				this.$request.api.getnewesList({
					pageIndex: this.pageIndex,
					org_id: uni.getStorageSync('projectItem').orgId,
					// org_id:JSON.parse(uni.getStorageSync('orgDeta')).orgId,
					project_id: uni.getStorageSync('projectItem').proId,
					type: '便民通讯录',
					name: this.name,
					// project_id:uni.getStorageSync('hourseList')[uni.getStorageSync('hourseNum')].proId,
				}).then(res => {
					if (this.pageIndex == 1) {
						this.newsData = res.data.data.datalist || [];
					} else {
						this.newsData = [...this.newsData, ...res.data.data.datalist];
					}
					console.log("this.newsData", this.newsData)
					this.nextPage = res.data.data.isEndPage
					this.loading = true;
					uni.hideLoading();
				})
			},

			//建立websocket链接
			creatSocket: function() {
				let that = this;
				// /* #ifdef H5 */
				// if (!('WebSocket' in window)) {
				// 	// 浏览器不支持 WebSocket
				// 	console.log('您的浏览器不支持 WebSocket!');
				// } else {
				// 	console.log('您的浏览器支持 WebSocket!');
				// 	//实例化websocket
				// 	that.ws = new WebSocket('wss://skt.515f.com/websocket/venus2/' + uni.getStorageSync('rawData')
				// 		.userId); //服务器
				// 	// that.ws = new WebSocket('ws://192.168.101.82:8900/websocket/venus/' + JSON.parse(uni.getStorageSync('userData')).userId);//本地

				// 	//保存设置全局websocket对象
				// 	// that.$global.setWs(that.ws)

				// 	//监听websocket连接打开方法
				// 	that.ws.onopen = function() {
				// 		// that.ws.send('TaylorSwift');
				// 		console.log('打开websocket');
				// 		//调用keepalive方法（不一定都需要调用此方法，可注释）
				// 		// that.keepAlive()
				// 	};
				// 	//监听websocket错误方法
				// 	that.ws.onerror = function(ev) {
				// 		console.log('连接已出错...');
				// 		//延迟执行重连
				// 		setTimeout(() => {
				// 			that.creatSocket();
				// 		}, that.$global.delay);
				// 	};
				// 	//监听websocket关闭方法
				// 	that.ws.onclose = function(ev) {
				// 		// 关闭 websocket
				// 		console.log('连接已关闭...');
				// 		//延迟执行重连
				// 		setTimeout(() => {
				// 			that.creatSocket();
				// 		}, that.$global.delay);
				// 	};

				// 	//监听websocket接收消息事件（接收来自服务器的实时消息）
				// 	that.ws.onmessage = function(res) {
				// 		console.log("sadsadsadasdsadsadsad")
				// 		var obj = JSON.parse(res.data) //将websocket的string数据转换成对象
				// 		func1(obj)
				// 	}
				// 	let func2 = function func3(val) {
				// 		//在此处即可同时使用websocket的数据和data数据，method函数
				// 		this.getUserList();
				// 		if (val.user_id == this.userInfo.user_id) {
				// 			this.userInfo.messageList.push({
				// 				userName: val.userName,
				// 				message: val.message,
				// 				beginTime: val.begin_time,
				// 				headImg: val.userHeadPortrait,
				// 				mineMsg: '0'
				// 			})
				// 			this.$nextTick(() => {
				// 				let msg = document.getElementById('scollDIV') // 获取对象
				// 				msg.scrollTop = msg.scrollHeight // 滚动高度
				// 			})
				// 		}

				// 	}
				// 	let func1 = func2.bind(this);
				// }
				/* #endif */

				/* #ifdef APP-PLUS */
				console.log("taylor")
				let url = url_config.split("://")[1];
				let a
				if (url == "www.515f.com/api") {
					a = "skt.515f.com"
				} else if (process.env.NODE_ENV == 'development') {
					a = url
				} else {
					//#ifdef H5
					const ipAddress = window.location.href
					const urlObject = new URL(ipAddress)
					a = url.split(":")[0] + ':' + urlObject.port + '/api'
					//#endif
					//#ifdef APP-PLUS
					a = url
					//#endif
				}
				a = "ws://" + a + "/websocket/venus?appType=2&userId=" + uni.getStorageSync('rawData').userId;
				console.log("websocket连接地址", a);
				// url="ws://"+url+"/websocket/venus/5/" + uni.getStorageSync('rawData').userId,
				that.ws = uni.connectSocket({
					// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
					url: a,
					success(data) {
						console.log("websocket连接成功");
					},
				});
				//监听websocket连接打开方法
				// that.ws.onopen = function() {
				// 	// that.ws.send('TaylorSwift');
				// 	console.log('打开websocket');
				// 	//调用keepalive方法（不一定都需要调用此方法，可注释）
				// 	// that.keepAlive()
				// };
				that.ws.onOpen((res) => {
					console.log("unapp--WebSocket连接正常打开中...！");
				})

				//监听websocket错误方法
				that.ws.onerror = function(ev) {
					console.log('连接已出错...');
					//延迟执行重连
					setTimeout(() => {
						that.creatSocket();
					}, that.$global.delay);
				};
				//监听websocket关闭方法
				// 这里仅是事件监听【如果socket关闭了会执行】
				that.ws.onClose(() => {
					console.log("已经被关闭了")
				})

				// 注：只有连接正常打开中 ，才能正常收到消息
				that.ws.onMessage((res) => {
					console.log("收到服务器内容：" + res.data);
					// 在私信页面是的通道
					uni.$emit('getUserList')
					var obj = JSON.parse(res.data) //将websocket的string数据转换成对象
					func1(obj)
				});

				let func2 = function func3(val) {
					//在此处即可同时使用websocket的数据和data数据，method函数
					this.getUserList();
					if (val.user_id == this.userInfo.user_id) {
						this.userInfo.messageList.push({
							userName: val.userName,
							message: val.message,
							beginTime: val.begin_time,
							headImg: val.userHeadPortrait,
							mineMsg: '0'
						})
						this.$nextTick(() => {
							let msg = document.getElementById('scollDIV') // 获取对象
							msg.scrollTop = msg.scrollHeight // 滚动高度
						})
					}

				}
				let func1 = func2.bind(this);
				/* #endif */

			},
			//消除红点消息
			updateDot(val) {
				let position = uni.getStorageSync('myPosition')
				let fromPosition = null
				let toPosition = null
				if (val.userType == 2) {
					if (val.fromPosition == position) {
						fromPosition = val.toPosition
						toPosition = val.fromPosition
					} else {
						fromPosition = val.fromPosition
						toPosition = val.toPosition
					}
				} else {
					if (val.fromPosition) {
						toPosition = val.fromPosition
					} else {
						toPosition = val.toPosition
					}
				}
				console.log('updateDotMessagechant', val)
				this.$request.api.updateDotMessagechant({
					user_id: uni.getStorageSync('rawData').userId,
					by_user_id: val.userId,
					toPosition: toPosition,
					fromPosition: fromPosition
				}).then(res => {})
			},
			ckickUserInfo(obj) {
				if (obj.userId == 0) {
					uni.showToast({
						title: "该业主未登录",
						icon: "error"
					})
					return
				}
				this.input2 = null
				obj.reqSource = this.reqSource
				var item = JSON.stringify(obj);
				var item2 = JSON.stringify(this.userLoggerInfo);
				// uni.setStorageSync('privateMessage', item);
				//消除红点消息
				this.updateDot(obj)
				//页面跳转
				uni.navigateTo({
					// url: '/pages/news/chat2?logerInfo=' + item2
					url: '/pages/news/chat2?val=' + item + "&logerInfo=" + item2
				});
			},
			natov(url) {
				uni.navigateTo({
					url: url,
				});
			},
			// 搜索
			selectUserList() {
				console.log("查询人员", this.input2)
				if (this.input2 != "" && this.input2 != null) {
					this.$request.api.getuserList2chant({
						pageIndex: 1,
						result: this.input2,
						pro_id: this.homelist.proId,
						org_id: uni.getStorageSync('projectItem').orgId,
						user_id: uni.getStorageSync('rawData').userId,
						app: 1, //app标识
						appType: 2,
						userType: this.userType,
						roomNumber: uni.getStorageSync('myPosition')
					}).then(res => {
						this.userList = res.data.data.datalist;
						this.reqSource = res.data.data.reqSource
					})

				} else {
					console.log("app红点！！！！！！！！！！！！！")
					// uni.setTabBarBadge({
					//   index: 2,
					//   text: '5'
					// }) 
					// plus.runtime.setBadgeNumber(6)

					this.getUserList();
				}
				console.log("查询人员", this.userList)

			},

			// 列表
			getUserList() {
				if (this.pageIndex < 2) {
					uni.showLoading({
						title: '加载中'
					});
				}
				this.loading = false;
				// user_id: uni.getStorageSync('rawData').userId,
				// app: 1, //app标识
				// pro_id: this.homelist.proId,
				// appType:2
				this.$request.api.userListchant({
					userId: uni.getStorageSync('rawData').userId,
					appType: 2,
					pro_id: this.homelist.proId,
					org_id: uni.getStorageSync('projectItem').orgId,
					roomNumber: uni.getStorageSync('myPosition')
				}).then(res => {
					this.userList = res.data.data.datalist;
					this.reqSource = res.data.data.reqSource
					this.loading = true;
					uni.hideLoading();
				})
			},
			getuserInfoByLogger() {
				this.$request.api.getuserInfoByLoggerchant({
					userId: uni.getStorageSync('rawData').userId,
				}).then(res => {
					this.userLoggerInfo = res.data.data;
				})
			},
			test(e) {
				console.log(e)
			},
			// clear() {
			// 	this.employee_name = null
			// 	this.onSearch()
			// },
			// onCall(tel) {
			// 	uni.makePhoneCall({
			// 		phoneNumber: tel //仅为示例
			// 	});
			// },
			onSearch() {
				this.pageInfo.page = 1
				this.getList()
			},

			// search: function() {
			// 	uni.navigateTo({
			// 		url: '../../news/search/search'
			// 	})
			// },
			// detail: function() {
			// 	uni.navigateTo({
			// 		url: '../chat/chat'
			// 	})
			// },
			//搜索框清除按钮
			clearh() {
				this.employee_name = null;
			},
			checked(index) {
				// if(index == 1){
				// 	uni.showToast({
				// 		icon: 'none',
				// 		title: '暂未开放'
				// 	})
				// 	return
				// }
				if (index == 0) {
					this.selectUserList()
				}
				if (index == 1) {
					this.getnewList()
				}
				this.isActive = index
				this.scrolltop = 1
			},
			datails() {
				uni.navigateTo({
					url: '/pages/lostarticle/detailslostarticle'
				})
			},
			received() {
				uni.navigateTo({
					url: '/pages/lostarticle/yilingreceived'
				})
			},

		},
		onPullDownRefresh: function() {
			uni.stopPullDownRefresh();
		}


	}
</script>


<style lang="scss" scoped>
	.repair-wrap {
		width: 100%;
		// min-height: 100vh;
		height: auto;
		background: #FFFFFF;
		overflow: hidden;

		.repair-box {
			background: #fff;

			.repair-titel {
				height: 44rpx;
				line-height: 44rpx;

				.repair-titel-l {
					float: left;
				}

				.repair-titel-r {
					float: right;
					color: #999;
				}
			}

			.repair-6 {
				color: #666;
			}
		}
	}

	.tab_nav {
		// display: flex;
		// justify-content: center;
		// align-items: center;
		// border-bottom: 1px solid #FFEEEEEE;
		display: flex;
		justify-content: center;
		align-items: center;
		// position: fixed;
		width: 100%;
		z-index: 10;
	}

	.tab_nav .navTitle {
		height: 72rpx;
		line-height: 72rpx;
		width: 100%;
		text-align: center;
		font-size: 32rpx;
		font-family: Alibaba PuHuiTi;
		color: #333;
	}

	.active {
		position: relative;
		color: #427705;
	}

	.active::after {
		content: "";
		position: absolute;
		width: 100rpx;
		height: 4rpx;
		background-color: #427705;
		left: 0px;
		right: 0px;
		bottom: 0px;
		margin: auto;
	}

	.search {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 28rpx;
		color: #427705;
		height: 100rpx;
		border-bottom: 1rpx solid #eeeeee;
		position: relative;

		.search-clear {
			width: 36rpx;
			height: 36rpx;
			position: absolute;
			left: 560rpx;
			top: 50%;
			transform: translateY(-50%);
		}

		.search-input {
			width: 613rpx;
			height: 66rpx;
			background: #f0f2f5;
			border-radius: 33rpx;
			line-height: 66rpx;
			font-size: 28rpx;
			padding: 0 33rpx;
			color: #333333;
			box-sizing: border-box;
		}
	}

	.search {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 28rpx;
		color: #3d7fff;
		height: 100rpx;
		border-bottom: 1rpx solid #eeeeee;
		width: 100%;
		padding-left: 27px;
		padding-right: 31px;
		// position: fixed;
		z-index: 20;
		background: #FFFFFF;

		.search-clear {
			width: 36rpx;
			height: 36rpx;
			position: absolute;
			left: 271px;
			top: 50%;
			transform: translateY(-50%);
		}

		.search-input {
			width: 312px;
			height: 66rpx;
			background: #f0f2f5;
			border-radius: 33rpx;
			line-height: 66rpx;
			font-size: 13px;
			padding: 0 33rpx;
			color: #333333;
			box-sizing: border-box;
		}

		.btn {
			width: 21%;
			line-height: 33px;
			// border: 1px solid red;
			border: 1px solid linear-gradient(180deg, #76D904 0%, #417505 100%);
			border-radius: 18px;
			text-align: center;
			margin-left: -43px;
			background: linear-gradient(180deg, #76D904 0%, #417505 100%);
		}
	}

	.content-phone {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx 0;
	}

	.new-list-box-row {
		width: 15rpx;
		height: 30px;
		background: #598f1aab;
		border-radius: 3px;
		margin-top: 10px;
	}

	.red {
		width: auto;
		height: 16px;
		line-height: 16px;
		border-radius: 16px;
		min-width: 16px;
		padding: 0 2px;
		font-size: 12px;
		text-align: center;
		// margin-right: 10px;
		position: absolute;
		// top: -26rpx;
		// right: -12rpx;
		color: #FFFFFF;
		background-color: #FF3B30;
		box-sizing: border-box;

	}

	.img_sex {
		width: 20px;
		height: 20px;
		position: absolute;
		text-align: center;
		z-index: 10;
		top: -28rpx;
		right: -12rpx;
	}
	
</style>